package com.bit.mybatis.mapper;

import com.bit.mybatis.model.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface UserInfoXmlMapper {
    List<UserInfo> selectAll();

    UserInfo selectById(Integer id);

    Integer insertUser(UserInfo userInfo);

    Integer insertUser2(@Param("userInfo") UserInfo userInfo);

    Integer deleteUser(Integer id);

    Integer updateUser(UserInfo userInfo);


    Integer insertByCondition(UserInfo userInfo);

    Integer updateByCondition(UserInfo userInfo);

    List<UserInfo> selectByCondition(UserInfo userInfo);

//    Integer batchDelete(List<Integer> ids);
    Integer batchDelete(Integer[] ids);

    List<UserInfo> selectByCondition2(@Param("map") Map<String, Object> map);
}
